package me.zhenqu.web.util;

/**
 * Created by IntelliJ IDEA.
 * User: yibing.tan
 * Date: 11-11-17
 * Time: 下午5:06
 * To change this template use File | Settings | File Templates.
 */
public class ContextParser {
    public static String parse(String page) {
        String parsed = "";
        int lastslash = page.lastIndexOf("_");
        if (lastslash == -1)
            throw new RuntimeException();
        String d = page.substring(lastslash + 1);
        Integer.parseInt(d);
        parsed = page.substring(0, lastslash) + "/" + d;
        return parsed;
    }
}
